Repository navigation
Harden v0.6 sensors, readiness tracking, platform toggles, validation, and blueprints - #331
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses post-merge review findings from v0.6 feature PRs (#327, #328, #329) ahead of the
v0.6.0release:None(unknown) instead of0when generator/propane/weather properties are missing onRunTimeSensor,ProtectionTimeSensor,BatteryVoltageSensor,OutdoorTemperatureSensor,CapacitySensor, andWeatherSensor.native_temperature, while preserving explicit0readings from the API.ReadinessTracker:async_load()with anasyncio.Lockand mark loaded only after storage reads complete.service_baseline_hoursunset (None) until the first validrun_timearrives (and heal legacy beta store records withlast_run_time: Noneandservice_baseline_hours: 0.0) to prevent false Day-1 maintenance alerts.0.0in bothasync_update_from_items()andasync_reset_service_timer()when a positivelast_run_timeis already recorded so missed-exercise and maintenance timers aren't corrupted.entry.options(_enabled_platforms, safely defaulting non-boolean option values toTrue) and trackcoordinator.loaded_platformsso unloading/reloading toggles platforms cleanly.maintenance_dueRepairs alerts: Restrict Mobile LinkhasMaintenanceAlertRepairs alerts to generators so propane tank monitors do not surface generator-specific reset prompts.safe_int_optionandsafe_float_optionhelpers across coordinator, readiness, and Repairs evaluation; enforce>= 10 spolling intervals in Options and Reconfigure; cap float options so non-finite floats (NaN/inf) are rejected while Voluptuous schemas remain serializable for the Home Assistant UI.Stopped(5) from_ACTIVE_GENERATOR_STATUSESincoordinator.pyandREADME.mdso switched-off generators return to idle polling instead of locking at the active interval.generac_outage_load_shedding.yaml: Normalize single-stringshed_entities, capture pre-outage active loads before shedding so already-offloads aren't turned on, and switch tomode: singlewith arepeat/wait_for_triggerloop so mid-outage status flaps (Running → Warning → Running) re-shed loads without wipingentities_to_restore.generac_fault_dealer_alert.yaml: Add optionalerror_code_sensor(default: null) and format notifications with|-+ Jinja trimming for clean line breaks.generac_storm_readiness_digest.yaml: Switch optionalfuel_level_sensordefault tonull, add optionalremaining_fuel_sensorandestimated_runtime_sensorinputs, and format notifications cleanly across lines with|-.Testing
pytest -v --no-cov: 180/180 passed (including new regression tests for missing-propertyNonebehavior,ReadinessTrackeredge cases & concurrency, platform toggle reloads, propane Repairs gating, Options/Reconfigure schema bounds &voluptuous_serializeUI compatibility,Stoppedpolling status, and end-to-end Home Assistant runtime execution of all 3 blueprints).pre-commit run --all-files: All 8 hooks passed (check-added-large-files,check-yaml,end-of-file-fixer,trailing-whitespace,flake8,reorder-python-imports,black,prettier).